function varargout = readerface(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @readerface_OpeningFcn, ...
                   'gui_OutputFcn',  @readerface_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before readerface is made visible.
function readerface_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to readerface (see VARARGIN)

  handles.reader001=char('自然辨证法纲要        ISBN7-81082-863-0      10/06/12         10/07/12',' ',...
                         '空间数据系统          ISBN7-5046-1473-8     10/06/22        10/07/12',' ');
  handles.reader002=char('CCD应用技术           ISBN7-5618-1364-3      10/05/03        10/06/03',' ');
  handles.reader003=char('数字信号处理          ISBN987-7302-133-7     10/07/01        10/08/01',' ',...
                         '线性系统理论          ISBN7-81077-408-5      10/07/02        10/08/02',' ',...
                         '数值分析              ISBN987-7-877-0        10/07/02        10/08/02',' ',...
                         '城市主题              ISBN7-5032-2936-5      10/07/02        10/08/02',' ',...
                         '实用英语              ISBN987-7-04-4         10/07/02        10/08/02',' ',...
                         '奇幻世界              ISSN1009-687-6         10/07/02        10/08/02',' ',...
                         '软件工程              ISBN987-7-302-8        10/07/02        10/08/02',' ',...
                         '自然辨证法纲要        ISBN7-81082-863-0      10/07/02        10/08/2',' ',...
                         '空间数据系统          ISBN7-5046-1473-8      10/07/02        10/08/02',' ',...
                         'CCD应用技术           ISBN7-5618-1364-3      10/07/02        10/08/02',' ');  

% Choose default command line output for readerface
handles.output = hObject;



% Update handles structure
guidata(hObject, handles);

% UIWAIT makes readerface wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = readerface_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on selection change in listbox4.
function listbox4_Callback(hObject, eventdata, handles)
% hObject    handle to listbox4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

                
% Hints: contents = get(hObject,'String') returns listbox4 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox4


% --- Executes during object creation, after setting all properties.
function listbox4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
search



% --- Executes during object creation, after setting all properties.
function text3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to text3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called


% --- Executes during object creation, after setting all properties.
function text4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to text4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called


% --- Executes during object creation, after setting all properties.
function text1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to text1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called



% --- Executes during object creation, after setting all properties.
function text2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to text2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called



% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global output sec_output thi_output for_output
set(handles.text1,'string',output);
set(handles.text2,'string',sec_output);
set(handles.text3,'string',thi_output);
set(handles.text4,'string',for_output);
choice=get(handles.text1,'string');
if(strcmp(choice,'reader001')==1)
    set(handles.edit11,'string',handles.reader001);
elseif (strcmp(choice,'reader002')==1)
    set(handles.edit11,'string',handles.reader002);
    errordlg('已过期，请尽快还书！','警告','modal');
elseif(strcmp(choice,'reader003')==1)
    set(handles.edit11,'string',handles.reader003);
    errordlg('借书额已满10本，不能再借书！','提示','modal');
else
    errordlg('错误！','Bad Input','modal'); 
    for i=1:100000
        for j=1:10000
            k=i+j;
        end
    end
    close
   close(handles.figure1);
end

    

function edit11_Callback(hObject, eventdata, handles)
% hObject    handle to edit11 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit11 as text
%        str2double(get(hObject,'String')) returns contents of edit11 as a double




% --- Executes during object creation, after setting all properties.
function figure1_CreateFcn(hObject, eventdata, handles)
ha=axes('units','normalized','pos',[0 0 1 1]);
uistack(ha,'down');
ii=imread('background.jpg');
image(ii);
colormap gray
set(ha,'handlevisibility','off','visible','on');
